<?php
class LoginForm extends Zend_Form
{
    public function init()
    {
    $errorUsername = 
        $username = $this->createElement('text','username');
        $username->setLabel('Username:')
                ->setRequired(true)
                ->addValidator('NotEmpty')
                ->addErrorMessage('Enter your username')
                ->addValidator(new Zend_Validate_StringLength(0, 45));
            
        $password = $this->createElement('password','password');
        $password->setLabel('Password:')
                ->setRequired(true)
                ->addValidator('NotEmpty')
                ->addErrorMessage("Enter your password")
                ->addValidator(new Zend_Validate_StringLength(0, 45));

        $signin = $this->createElement('submit','signin');
        
        $signin->setLabel('Sign in')->setIgnore(true);

        $this->addElements(array(
                        $username,
                        $password,
                        $signin,
        ));
    }
}


